package com.ky.pro.java.fx.spring;

import com.ky.pro.java.fx.spring.entity.Klass;
import com.ky.pro.java.fx.spring.entity.School;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author kevin
 */
public class SpringDemoApp {

    public static void main(String[] args) {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application-context.xml");

        System.out.println("XML装载：");
        School school = applicationContext.getBean("school001", School.class);
        school.dump();

        System.out.println("Annotation装载：");
        School annoSchool = applicationContext.getBean("anno-school-001", School.class);
        annoSchool.dump();

        System.out.println("Configuration装载：");
        School confSchool = applicationContext.getBean("conf-school-001", School.class);
        confSchool.dump();
    }

}
